package com.zukxu.items.project.comment.controller;

import com.zukxu.items.project.comment.dto.VideoCommentDTO;
import com.zukxu.items.project.comment.service.IVideoCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * Description:视频评论接口控制层
 *
 * @author zukxu
 * @date 2020/9/21 0021 9:37
 */
@RestController
@RequestMapping("videoComment")
@AllArgsConstructor
@Api(tags = "视频评论控制层")
public class VideoCommentController {
	@Autowired
	private IVideoCommentService videoCommentService;


	@ApiOperation("分页查询评论数据")
	@GetMapping("/pageInfo")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "current", value = "当前页", defaultValue = "1"),
			@ApiImplicitParam(name = "size", value = "每页数量", defaultValue = "10"),
			@ApiImplicitParam(name = "videoId", value = "视频Id")
	})
	public List<VideoCommentDTO> pageInfoApp(Integer current, Integer size, String videoId) {
		return videoCommentService.pageInfo(current, size, videoId);
	}
}
